Skip to content

Conversation

evenkkl
Copy link
Member

@evenkkl evenkkl commented Nov 5, 2026 •

Closes #20.

What was done

  • New e2e/ workspace (@t19/e2e) with Playwright and @axe-core/playwright. Root script pnpm test:e2e; the base URL comes from E2E_BASE_URL (default http://localhost:5173/project2/). pnpm test does not run it, so CI is unchanged.
  • e2e/tests/search.spec.ts:
    • Journey: search "beatles" → filter 1960s → sort Z–A and A–Z → open Abbey Road → publish a 4-star review → reload and the review is still there → back to discovery keeps q, decade and sort from the URL → delete the review so runs leave the database as it was.
    • Case-insensitivity: ABBEY and abbey give the same results.
    • Keyboard only: Tab to the skip link, Enter, Tab to the search box, type and Enter, Tab to the result (focus ring visible), Enter opens the album.
  • e2e/tests/a11y.spec.ts: axe-core scans (WCAG 2.1 A + AA) of the start page, results with filters open, empty results and the album detail page. Runs in a real browser, so colour contrast is included, unlike the jsdom tests.
  • README, AGENTS.md and AI-USAGE.md updated.

The tests expect the db:seed catalog. The VM's MusicBrainz catalog has no Abbey Road or Beatles, so do not point them at the deployed site.

What was tested

  • All 7 tests pass against a local stack (migrate + db:seed, API, Vite), and pass again on a second run (the cleanup works).
  • Mutation checks: a low-contrast .muted colour fails all 4 axe tests with color-contrast, and renaming a sort option fails the journey.
  • pnpm format:check, pnpm lint, typecheck and pnpm test pass.

How to run

pnpm --filter @t19/e2e exec playwright install chromium   # once
pnpm --filter @t19/server db:seed
pnpm --filter @t19/server dev
pnpm dev
pnpm test:e2e

Adds an e2e workspace with pnpm test:e2e. Covers search, filter, sort, detail, review persistence across reload, case-insensitive search, a keyboard-only path and WCAG 2.1 AA axe scans. Runs against a db:seed stack via E2E_BASE_URL.
@evenkkl evenkkl requested a review from a team as a code owner November 5, 2026 15:49
@evenkkl evenkkl linked an issue Nov 5, 2026 that may be closed by this pull request
4 tasks
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Playwright E2E journey + axe-core
1 participant